Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number of open connections is configurable #170

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

Maelkum
Copy link
Collaborator

@Maelkum Maelkum commented Oct 1, 2024

By default, libp2p connection manager has low and high thresholds.

With the changes in this PR, we use the specified limit as the low threshold but allow up to 20% more connections. When we reach the upper bound (checked each 10 seconds), we trim open connections back to the specified value.

Also, we protect boot nodes against pruning, as those are typically higher priority connections like the head node.

Revamp of #162

Sidenote - updated some dependencies to resolve a security issue reported by dependabot.

@Maelkum Maelkum self-assigned this Oct 1, 2024
@Maelkum Maelkum merged commit ed70d0a into main Oct 10, 2024
5 checks passed
@Maelkum Maelkum deleted the configurable-connection-limit branch October 10, 2024 10:22
@dmikey dmikey restored the configurable-connection-limit branch November 13, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants